package com.zttek.photosShareProject.common.json;

import com.zttek.photosShareProject.modules.model.Image;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: Y
 * Date: 2017-09-05
 * Time: 11:29
 */
public class ImageVO implements VO {

    private Long imageId;
    private String rawUrl;
    private String thumbUrl;
    private UserVO author = null;

    public ImageVO() {
    }

    public ImageVO(Image image) {
        this(image, null);
    }

    public ImageVO(Image image, UserVO author) {
        imageId = image.getId();
        rawUrl = image.getPath();
        thumbUrl = image.getThumbPath();
        this.author = author;
    }

    public Long getImageId() {
        return imageId;
    }

    public void setImageId(Long imageId) {
        this.imageId = imageId;
    }

    public String getRawUrl() {
        return rawUrl;
    }

    public void setRawUrl(String rawUrl) {
        this.rawUrl = rawUrl;
    }

    public String getThumbUrl() {
        return thumbUrl;
    }

    public void setThumbUrl(String thumbUrl) {
        this.thumbUrl = thumbUrl;
    }

    public UserVO getAuthor() {
        return author;
    }

    public void setAuthor(UserVO author) {
        this.author = author;
    }
}
